package com.kcs.common.framework;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.kcs.common.utils.Constant;
import com.kcs.dc.report.model.dao.model.headermenuModel;


public class GenericAction extends GenericAbstractAction {
	
	protected void executeScreenPreProcess(ActionMapping mapping, GenericForm srcform,
			HttpServletRequest request, HttpServletResponse response) throws Exception{
		// Get UserId and UserGroup from session, then set to form object.
		HttpSession session = null;
		session = request.getSession(true);
		srcform.setUserId((String)session.getAttribute(Constant.SESSION_USERID));
		srcform.setUserName((String)session.getAttribute(Constant.SESSION_USERNAME));
		srcform.setLastaccessTime((String)session.getAttribute(Constant.SESSION_ACCESSTIME));
		srcform.setPasswordEncode((String)session.getAttribute(Constant.SESSION_PASSWORD));
		
		srcform.setMenuList((List<headermenuModel>) session.getAttribute(Constant.SESSION_AUTHORIZEDMENULIST));		
	
	}
	
	protected void executeScreenPostProcess(ActionMapping mapping, GenericForm srcform, ActionForm form, 
			HttpServletRequest request, HttpServletResponse response) throws Exception{
				
		
	}

}
